import request from '@/utils/request'

/**
 * 获取我未参加的考试列表
 * @param {*} query 
 * @returns 
 */
export function getMyExamine(query) {
  return request({
    url: '/drill/attend/list',
    method: 'get',
    params: query
  })
}

/**
 * 获取我的考试试卷详情
 * @param {*} query 
 * @returns 
 */
export function getMyExamineDetail(attendId) {
  return request({
    url: '/drill/attend/selectOnePaper/' + attendId,
    method: 'get',
  })
}

/**
 * 获取所有考试记录
 * @param {*} query 
 * @returns 
 */
export function getAllExamine(query) {
  return request({
    url: '/drill/attend/examList',
    method: 'get',
    params: query
  })
}

/**
 * 提交试卷评分
 * @param {*} data 
 * @returns 
 */
export function updateScore(data) {
  return request({
    url: '/drill/answer/updateScores',
    method: 'put',
    data: data
  })
}